
.686p
.Model Flat,StdCall
Option CaseMap :None

.CODE

IoWritePortByte PROC STDCALL uses edx eax, _Port:WORD, _Value:BYTE
	mov al, _Value
	mov dx, _Port
	out dx, al
	ret
IoWritePortByte ENDP

IoWritePortWord PROC STDCALL uses edx eax, _Port:WORD, _Value:WORD
	mov ax, _Value
	mov dx, _Port
	out dx, ax
	ret
IoWritePortWord ENDP

IoWritePortDword PROC STDCALL uses edx eax, _Port:WORD, _Value:DWORD
	mov eax, _Value
	mov dx, _Port
	out dx, eax
	ret
IoWritePortDword ENDP

IoReadPortByte PROC STDCALL uses edx, _Port:WORD
	mov dx, _Port
	in  al, dx
	ret
IoReadPortByte ENDP

IoReadPortWord PROC STDCALL uses edx, _Port:WORD
	mov dx, _Port
	in  ax, dx
	ret	
IoReadPortWord ENDP

IoReadPortDword  PROC STDCALL uses edx, _Port:WORD
	mov dx, _Port
	in eax, dx
	ret	
IoReadPortDword ENDP

END